在 FileMaker 中拆分文本

发布于 2024-11-14 16:43:50 字数 336 浏览 8 评论 0原文

这可能是一个非常简单的问题,但我遇到了一些麻烦。我在文本字段中有一些信息,以 firstname.lastname 的形式记录 UserID 。出于报告目的,我需要将该数据拆分为 2 个新字段(分别创建为 FirstName 和 LastName)。我尝试用 LeftWords 和 RightWords 的计算替换字段内容,但不幸的是它不起作用:LeftWords(Attendance::UserID; 1) 代表名字,RightWords(Attendance::UserID; 1) 代表姓氏。它给我的又是UserID。我认为让我失望的是分隔 UserID 的“句点”。有什么建议吗?我查找了多种分割文本的方法,但大多数都是用空格分隔文本......

This may be a pretty easy question but I'm having some trouble with it. I have some information in a text field that logs a UserID in the form of firstname.lastname . What I need for reporting purposes is to split that data into 2 new fields (created as FirstName and LastName respectively). I've tried replacing field contents with a calculation using LeftWords and RightWords but it unfortunately did not work: LeftWords(Attendance::UserID; 1) for first name and RightWords(Attendance::UserID; 1) for last name. What it gave me was the UserID again. I think what is throwing me off is the 'period' that separates the UserID. Any suggestions? I've looked up a number of ways of splitting text, but most have been splitting text separated by a space...

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

请你别敷衍 2024-11-21 16:43:50

名字:

Left ( Attendance::UserID ; Position(Attendance::UserID; "."; 1; 1)-1 )

姓氏:

Right( Attendance::UserID; Length(Attendance::UserID) - Position(Attendance::UserID; "."; 1; 1) )

For first name:

Left ( Attendance::UserID ; Position(Attendance::UserID; "."; 1; 1)-1 )

For last name:

Right( Attendance::UserID; Length(Attendance::UserID) - Position(Attendance::UserID; "."; 1; 1) )
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文