how to put values on an option after executing a condition like
IF ("option111"="blanc") THEN
option222::"aaa","bbb","ccc","ddd","eee","fff";
this didn't work
*This post is locked for comments
how to put values on an option after executing a condition like
IF ("option111"="blanc") THEN
option222::"aaa","bbb","ccc","ddd","eee","fff";
this didn't work
*This post is locked for comments
Hi Sikanav,
Although you can use integer number (start from 0), it is recommended to use name value.
For example, "Document Type" option field of "Sales Header" table with values "Quote,Order,Invoice,Credit Memo,Blanket Order,Return Order".
1. For comparing: you want to do something with Invoice (integer number is 2):
- Recommended: IF ("Document Type" = "Document Type"::"Invoice") THEN BEGIN ...
- Not Recommended: IF ("Document Type" = 2) THEN BEGIN ...
2. For assigning: you want to assign Invoice value to Document Type
- Recommended: "Document Type" := "Document Type"::"Invoice";
- Not Recommended: "Document Type" := 2;
3. For Filtering: you want to filter Document Type with Order or Invoice
- Recommended: SETFILTER("Document Type", '%1|%2', "Document Type"::"Order", "Document Type"::"Invoice");
- Not Recommended: SETFILTER("Document Type", '%1|%2', 1, 2);
Are you trying to modify the table field's data type through coding?
U sure it is possible through coding to set data type of fields?
Abdul.
Hey Sikanav,
Either go ahed as recomended by CristianAguerre OR you can to use like this
IF OptionField = 4 Then BEGIN - You can use the Integer value.
You can use something like, as said by Cristian:
IF (optionA = optionA::valueOption1) THEN BEGIN
optionB := optionB::valueOption1;
END;
or you can use integer values of the sequential list of Strings.
Please refer below link for more information:
https://msdn.microsoft.com/en-us/library/dd355166.aspx
-Yogesh Kulkarni
Please verify, if you find answer helpful.
Hi Sikanav,
Maybe your want something like this:
IF (option111 = option111::valueOption1) THEN BEGIN
option222 := option222::valueOption1;
END;
Regards!
yes
Do you mean to say based on condition you need to fill another option value ?
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,280 Super User 2024 Season 2
Martin Dráb 230,214 Most Valuable Professional
nmaenpaa 101,156