Converting field into table & vice versa
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Converting field into table & vice versa
What would be a script for turning a field into a table, or vice versa. This is easily done in the Object Inspector, but I would like to be able to do this in a script.
Thanks,
David
Thanks,
David
Re: Converting field into table & vice versa
Hi David,
You cane use the replace command like this:
Best regards
Jean-Marc
You cane use the replace command like this:
Code: Select all
function FromCommaToTab pText -- pText contains lines with items, itemdel = ","
replace "," with tab in pText
return pText
end FromCommaToTab
function FromTabToComma pText
replace tab with "," in pText
return pText
end FromTabToComma
Jean-Marc
https://alternatic.ch
Re: Converting field into table & vice versa
Thanks for the reply.
I'm running Revolution 2.1.2, and I don't see that function in the documentation, nor does it work. Other ideas?
Best
David
I'm running Revolution 2.1.2, and I don't see that function in the documentation, nor does it work. Other ideas?
Best
David
Re: Converting field into table & vice versa
Hi David,
Are you sur there is not a "replace" command in Rev 2.12
Best regards
Jean-Marc
I don't remember if the "replace" command exist in Rev 2.12 but i'am sur there is not a FromTabToComma finction. I write itI'm running Revolution 2.1.2, and I don't see that function in the documentation

Are you sur there is not a "replace" command in Rev 2.12
How do you try to use it ?, nor does it work
Best regards
Jean-Marc
https://alternatic.ch
Re: Converting field into table & vice versa
Jean-Marc,
There is a replace command (and a replacetext command) in Revolution 2.1.2, but I don't see how I can use it to convert a table to a normal field or vice-versa.
David
There is a replace command (and a replacetext command) in Revolution 2.1.2, but I don't see how I can use it to convert a table to a normal field or vice-versa.
David
Re: Converting field into table & vice versa
Hi David,
I put a simple stack in attachment
Best regards
Jean-Marc
I put a simple stack in attachment
Best regards
Jean-Marc
- Attachments
-
- ConvertFldToTable.livecode.zip
- (1.35 KiB) Downloaded 265 times
https://alternatic.ch
Re: Converting field into table & vice versa
Thank you, Jean-Marc. This should solve the problem.
Best,
David
Best,
David